package com.mall.security;

import java.util.List;
import java.util.Map;
import org.apache.shiro.authc.UsernamePasswordToken;

public class UserAuthenticationToken extends UsernamePasswordToken {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;				//用户ID
	private List<Map<String,Object>> power;  //权限列表
	private String captcha;         // 验证码
	
	/**
	 * @param username 用户名
	 * @param password  密码
	 * @param power 权限列表对象
	 * @param captcha 验证码 (可选)
	 */
	public UserAuthenticationToken(Integer id, String username, String password, List<Map<String,Object>> power,String captcha) {
		super(username, password);
		this.id = id;
		this.power = power;
		this.captcha = captcha;
	}
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCaptcha() {
		return captcha;
	}
	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

	public List<Map<String,Object>> getPower() {
		return power;
	}

	public void setPower(List<Map<String,Object>> power) {
		this.power = power;
	}
	
}
